import { EventEmitter } from 'events';
import { IDisposable } from "../types";
import { EnvironmentVariables } from "../variables/types";
import { ExecutionResult, IBufferDecoder, IProcessService, ObservableExecutionResult, ShellOptions, SpawnOptions } from "./types";

export class ProcessService extends EventEmitter implements IProcessService {
  private processesToKill = new Set<IDisposable>();

  constructor(private readonly decoder: IBufferDecoder, private readonly env?: EnvironmentVariables) {
      super();
  }
  execObservable(file: string, args: string[], options?: SpawnOptions): ObservableExecutionResult<string> {
    throw new Error("101Method not implemented.");
  }
  exec(file: string, args: string[], options?: SpawnOptions): Promise<ExecutionResult<string>> {
    throw new Error("102Method not implemented.");
  }
  shellExec(command: string, options?: ShellOptions): Promise<ExecutionResult<string>> {
    throw new Error("103Method not implemented.");
  }
  on(event: "exec", listener: (file: string, args: string[], options?: SpawnOptions) => void): this {
    throw new Error("104Method not implemented.");
  }
  dispose(): void | undefined {
    throw new Error("105Method not implemented.");
  }
}